package cn.mw.cmdb.entity;

import cn.mw.cmdb.enums.TableViewTypeEnum;
import cn.mw.microMonitorCommon.api.cmdb.TableIdEnum;
import cn.mw.microMonitorCommon.api.cmdb.TreeView;

import java.util.List;

public class UserGroupTreeViewInstanceInfo implements TreeView {

    private InstanceInfo instanceInfo;
    private int count;
    private String itemAssetsStatus;
    private List<String> childStatus;

    public UserGroupTreeViewInstanceInfo(InstanceInfo instanceInfo) {
        this.instanceInfo = instanceInfo;
    }

    @Override
    public Object getId() {
        return instanceInfo.getId();
    }

    @Override
    public Object getParentId() {
        return instanceInfo.getGroups();
    }

    @Override
    public String getItemName() {
        return instanceInfo.getInstanceName();
    }

    @Override
    public String getType() {
        return TableIdEnum.instance.name();
    }

    @Override
    public String getViewType() {
        return TableViewTypeEnum.list.getCode();
    }

    @Override
    public String getItemAssetsStatus() {
        return this.itemAssetsStatus;
    }

    @Override
    public void setItemAssetsStatus(String itemAssetsStatus) {
        this.itemAssetsStatus = itemAssetsStatus;
    }

    @Override
    public int getCount() {
        return count;
    }

    @Override
    public void setCount(int count) {
        this.count = count;
    }

    @Override
    public List<String> getChildStatus() {
        return this.childStatus;
    }

    @Override
    public void setChildStatus(List<String> status) {
        this.childStatus = status;
    }
}
